package Demo08.Demo0826;

import java.util.Arrays;

public class CSDN {
    /* public static void main(String[] args) {
       memory(1);
    }
    public static void memory(int t){
        int a = 1;
        int b = 2;
        int c = 3;

        int[] arr = new int[4];
    }
*/
    /*public static void main3(String[] args) {
        String[] str = {"111","222","333"};
        System.out.println();
    }
    public static int findDate(String[] str,String s){
        int key = -1;
        for (int i = 0; i < str.length; i++) {
            if(str[i] == s){
                key = i;
            }
        }
        if(key == -1){
            return -1;
        }
        return key;
    }
    public static void main2(String[] args) {
        int[] arr = {1,2,3,4,5};
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }
    public static void main1(String[] args) {
        byte[] a = new byte[5];
        short[] b = new short[5];
        int[] c = new int[5];
        long[] d = new long[5];
        float[] e = new float[5];
        double[] f = new double[5];
        char[] g = new char[5];
        boolean[] h = new boolean[2];
    }*/
    /* public static void main(String[] args) {
        int[] arr = ret(5);
        for (int i:arr) {
            System.out.print(i + " ");
        }
    }
    public static int[]  ret(int a){
           if(a <= 0){
               return null;
           }
           int[] arr = new int[a];
            for (int i = 0; i < a; i++) {
                arr[i] = i + 1;
            }
            return arr;
        }*/
    /*public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        func(arr);
        System.out.println("arr[0] = " + arr[0]);
    }
    public static int[] func(int[] a){
        a[0] = 10;
        System.out.println("a[0] = " + a[0]);
        return a;
    }*/

    public static void main2(String[] args) {
        /*int[] arr = {1,2,3,4,5,6};
        int[] newArr = arr;
        newArr[0] = 10;
        System.out.println("newArr: " + Arrays.toString(arr));*/

       /* int[] arr = {1,2,3,4,5,6};
        int[] newArr = Arrays.copyOf(arr, arr.length);
        System.out.println("newArr: " + Arrays.toString(newArr));*/
    }
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6};
        System.out.println(Arrays.toString(arr));
    }
}


